package com.bw.msg.bind;

import androidx.databinding.BindingAdapter;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;

public
/**
 * @author Lishaohe
 * @description:
 * @date :2021/10/19 0019 上午 9:25
 *
 */
class MsgBind {

    @BindingAdapter(value = {"msgadapter"})
    public static void bindmsg(
            RecyclerView recyclerView,
            BaseQuickAdapter adapter
    ){
        LinearLayoutManager manager = new LinearLayoutManager(recyclerView.getContext());
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        recyclerView.setLayoutManager(manager);
        recyclerView.setAdapter(adapter);
    }
}
